package org.csu.webjpetstoreback.model;

import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.stereotype.Repository;
import org.springframework.web.bind.annotation.RequestBody;

import java.io.Serializable;

@Builder
@NoArgsConstructor
@AllArgsConstructor
@Data
@Repository
@TableName(value = "account")
public class Account implements Serializable {
    private static final long serialVersionUID = -5644799954031156649L;
    @TableId(value = "userid")
    public String userid;
    public String email;
    public String firstname;
    public String lastname;
    public String status;
    public String addr1;
    public String addr2;
    public String city;
    public String state;
    public String zip;
    public String country;
    public String phone;
    public String favcategory;

    public void setAccount( Token token){
        this.userid = token.userid;
        this.email = token.email;
        this.firstname = token.firstname;
        this.lastname = token.lastname;
        this.status = token.status;
        this.addr1 = token.addr1;
        this.addr2 = token.addr2;
        this.city = token.city;
        this.state = token.state;
        this.zip = token.zip;
        this.country = token.country;
        this.phone = token.phone;
        this.favcategory = token.favcategory;
    }
}
